using System;
using System.Collections;
using System.IO;
using System.Text.RegularExpressions;

namespace Tool.BaseClass
{
	public static class GClass1
	{
		public static bool smethod_0(this Hashtable hashtable_0, string string_0, ref string string_1)
		{
			bool flag = false;
			lock (hashtable_0.SyncRoot)
			{
				foreach (DictionaryEntry dictionaryEntry in hashtable_0)
				{
					if (dictionaryEntry.Key.ToString().ToLower().Trim() == string_0.ToLower().Trim() && (string.IsNullOrEmpty(string_1) || dictionaryEntry.Value.ToString().ToLower().Trim() == string_1.ToLower().Trim()))
					{
						flag = true;
						string_1 = hashtable_0[dictionaryEntry.Key].ToString();
						break;
					}
				}
			}
			return !flag;
		}

		public static bool smethod_1(this string string_0)
		{
			System.Text.RegularExpressions.Match match = new System.Text.RegularExpressions.Regex(GClass2.GClass3.ImageFile, System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(string_0);
			return match.Length <= 0;
		}

		public static string smethod_2(this string string_0)
		{
			return string_0.Replace("\\\"", "").Replace("\"", "").Replace("'", "");
		}

		public static bool smethod_3(this Hashtable hashtable_0, string string_0)
		{
			bool result = false;
			lock (hashtable_0.SyncRoot)
			{
				foreach (DictionaryEntry dictionaryEntry in hashtable_0)
				{
					if (dictionaryEntry.Key.ToString().ToLower().Trim() == string_0.ToLower().Trim())
					{
						result = true;
						break;
					}
				}
			}
			return result;
		}

		public static bool smethod_4(this Hashtable hashtable_0, string string_0, string string_1)
		{
			bool result = false;
			lock (hashtable_0.SyncRoot)
			{
				foreach (DictionaryEntry dictionaryEntry in hashtable_0)
				{
					if (dictionaryEntry.Key.ToString().ToLower().Trim() == string_0.ToLower().Trim() && dictionaryEntry.Value.ToString().ToLower().Trim().Equals(string_1.ToLower().Trim()))
					{
						result = true;
						break;
					}
				}
			}
			return result;
		}

		public static string smethod_5(this Hashtable hashtable_0, string string_0)
		{
			string result = "";
			lock (hashtable_0.SyncRoot)
			{
				foreach (DictionaryEntry dictionaryEntry in hashtable_0)
				{
					if (dictionaryEntry.Key.ToString().ToLower().Trim() == string_0.ToLower().Trim())
					{
						result = dictionaryEntry.Value.ToString();
						break;
					}
				}
			}
			return result;
		}

		public static string smethod_6(this string string_0, string string_1, string string_2, GClass19.GClass20 gclass20_0, int int_0)
		{
			int startat = gclass20_0.Number + int_0;
			gclass20_0.method_0(string_1, string_2);
			string_1 = System.Text.RegularExpressions.Regex.Escape(string_1);
			return new System.Text.RegularExpressions.Regex(string_1, System.Text.RegularExpressions.RegexOptions.IgnoreCase | System.Text.RegularExpressions.RegexOptions.Singleline).Replace(string_0, string_2, 1, startat);
		}

		public static bool smethod_7(this string string_0, ref string string_1)
		{
			bool result;
			if (!(string_0.Trim() == "") && !(string_0.ToLower().Trim() == "about:blank") && !(string_0 == "#"))
			{
				string_1 = string_0.Replace("\\/", "/").Trim();
				result = true;
			}
			else
			{
				result = false;
			}
			return result;
		}

		public static bool smethod_8(this string string_0)
		{
			return string_0.IndexOfAny(Path.GetInvalidFileNameChars()) < 0;
		}
	}
}
